﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;
using SCMS.Model;

namespace SCMS.CoreBusinessLogic.Request4Advance
{
    public interface IRequest4Advance
    {
        bool SaveRequest4Advance(Model.AdvanceRequest entity,EntityCollection<AdvanceRequestBudgetLine> collection);
        string GenerateUniquNumber(CountryProgramme cp);
        List<Model.AdvanceRequest> GetAdvanceRequests(Guid cpId);
        bool SaveRFA(AdvanceRequest rfa);
        bool SaveRFADetail(AdvanceRequestBudgetLine rfaBL);
        AdvanceRequest GetRFAById(Guid Id);
        List<AdvanceRequestBudgetLine> GetRFADetails(Guid rfaId);
        AdvanceRequestBudgetLine GetRFABLById(Guid Id);
        bool DeleteRFA(Guid Id);
        bool DeleteRFADetail(Guid Id);
        List<AdvanceRequestOption> GetAdvanceOptions();
        List<AdvanceRequest> GetAdvanceRequestsForReview(SystemUser currentUser);
        List<AdvanceRequest> GetAdvanceRequestsForAuth(SystemUser currentUser);
        List<AdvanceRequest> GetAdvanceRequestsForPosting(Guid countryProgId, SystemUser currentUser);
        bool CommitFunds(AdvanceRequest rfa);
        bool EffectPosting(AdvanceRequest rfa, Staff poster);
        // <summary>
        /// Send notification to requestor and project managers of the affected budget lines
        /// </summary>
        /// <param name="rfa"></param>
        void NotifyAffected(AdvanceRequest rfa);
    }
}
